<template>
  <a-card :bordered="false" :style="{ marginTop: '12px',height:'320px' }">
    <span slot="title"> <a-icon type="tags" style="color:#3393FC;margin-right: 5px" theme="filled"/>流程类型统计</span>
    <a slot="extra" @click="loadMore">更多</a>
    <pie class="statistic" title="流程统计" :dataSource="pieDate" :height="240"/>
  </a-card>
</template>

<script>
  import Pie from '@/components/chart/Pie'
  import { getPieData } from '@/api/api'

  export default {
    name: 'EoaCmsProcessTypeChat',
    components: {
      Pie,
    },
    data () {
      return {
        pieDate: [],
      }
    },
    created() {
      //图表数据
      this.loadChartData()
    },
    methods: {
      loadMore(path){
        let query={}
        this.$router.push({ path: path,query:query})
      },
      loadChartData(){
        getPieData().then((res)=>{
          if(res.success){
            this.pieDate=res.result;
          }
        })
      }
    }
  }
</script>

<style scoped>

</style>